package com.kehongborui.empmanagesys.model;

/**
 * @author zhang peng yang ming
 * @CopyRight (C) http://www.csdn.com
 * @brief
 * @email 122162005@qq.com
 * @date 2018-07-20
 */
public class Page {
    /**
     * 当前页
     */

    private Integer current;
    /**
     * 总页数
     */
    private Integer total;

    /**
     * 对应查询数据的总量
     */
    private Integer amount;

    /**
     * 每页显示的数量
     */
    private Integer size = 2;

    public Integer getCurrent() {
        return current;
    }

    public void setCurrent(Integer current) {
        this.current = current;
    }

    /**
     * 获取总页数
     * @return
     */
    public Integer getTotal() {
        return (size + amount - 1) / size;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }
}
